package lab02.test12;

/**
 * 	定义图形类Shape的子类Rectangular类重写(extends)求面积及周长的功能 (ctr+o)
 * Created by AIR on 2017/10/25.
 */
public class Rectangular extends Shape{
    double length;
    double width;
    @Override
   void getArea() {
        System.out.println("长方形的面积等于="+length*width);

    }

    @Override
    void getLength() {
        System.out.println("长方形的周长等于="+2*(length*width));

    }
}
